package cn.sytton.taffe.web.flw.entity;

import cn.sytton.taffe.framework.base.entity.BaseUpdatedEntity;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.sql.Timestamp;

/**
 * <p>
 * 工作流表单_结构表 对象
 * </p>
 *
 * @author rock
 * @since 2023-09-26
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("flw_form_def_structure")
@Schema(description = "工作流表单_结构")
public class FormDefStructureEntity extends BaseUpdatedEntity {

    @Schema(description = "表单结构ID")
    @TableId(type = IdType.ASSIGN_ID)
    private String structureId;

    @Schema(description = "表单ID")
    private String formId;

    @Schema(description = "版本")
    private Integer version;

    @Schema(description = "表单结构")
    private String formJson;

    //-----以下是关联属性-----

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public Timestamp getUpdatedTime() {
        return super.getUpdatedTime();
    }

    @TableField(exist = false)
    private Integer active;  //是否激活状态 激活1/未激活0

    @TableField(exist = false)
    private String formName;

    @TableField(exist = false)
    private String processDefKey;

    @TableField(exist = false)
    private String processDefId;
}
